class OrderItem < ApplicationRecord
  enum state: [:pending, :checkouted, :sent, :completed, :after_sale, :agree, :disagree, :unchange]
  enum after_sale_type: [:refund, :returned]

  belongs_to :order, optional: true
  belongs_to :user
  belongs_to :spu
  belongs_to :sku
  belongs_to :refund_reason, optional: true

  has_many :comments
  has_many :refund_pictures

end
